Don't initialize GL if it has been disabled
authorMatthias Clasen <mclasen@redhat.com>
Fri, 19 Dec 2014 17:27:31 +0000 (12:27 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 19 Dec 2014 17:27:31 +0000 (12:27 -0500)
We've observed hangs of mutter when it initializes GTK+, which
are caused by initializing GL, which in turn makes xwayland
call back into mutter. With this change, mutter should just
disable GL support in GDK, and things will work.

gdk/x11/gdkglcontext-x11.c

index d686768ee5e67d7d0585776fd4d13dbefd83a717..93bb886bf1c16216dc05d200f9c618189ea7fd6b 100644 (file)
@@ -586,6 +586,9 @@ gdk_x11_screen_init_gl (GdkScreen *screen)
   if (display_x11->have_glx)
     return TRUE;
 
+  if (_gdk_gl_flags & GDK_GL_DISABLE)
+    return FALSE;
+
   dpy = gdk_x11_display_get_xdisplay (display);
 
   if (!glXQueryExtension (dpy, &error_base, &event_base))